﻿@model IEnumerable<DataAccess.DB.NhapKho>

@{
    ViewBag.Title = "Nhập kho";
    Layout = "~/Views/Shared/_Layout_Printf.cshtml";
}
<table>
    <tr>
        <td>
            <span>Cty CP dược VTYT Thái Bình - Kho OTC</span>
        </td>
        <td style="text-align: right">
            <span>Ngày</span> @DateTime.Now.Day <span>Tháng </span>@DateTime.Now.Month <span>Năm</span> @DateTime.Now.Year
        </td>
    </tr>
    <tr>
        <td style="padding-left: 38px">
            <span>0363841892</span> - <span>0363847620</span>
        </td>
        <td style="text-align: right">
            
        </td>
    </tr>
    <tr>
        <td colspan="2" style="text-align: center">
            <h1>Thống kê bán hàng</h1>
        </td>
    </tr>
</table>
<table class="ms-list-form">
    <tr>
        <th>
            <span>Mã HĐ</span>
        </th>

        <th>
            <span>DVCC</span>
        </th>
       
        <th>
            <span>Ngày nhập kho</span>
        </th>
        <th>
            <span>Tổng thanh toán
            </span>
        </th>        
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td style="border-left: 1px solid #d4d4d4">
                @Html.DisplayFor(modelItem => item.MaHoaDon)
            </td>

            <td>
                @Html.DisplayFor(modelItem => item.DVCC.MaDVCC)
            </td>
            
            <td>
                <span>@DuocThaiBinh.Common.Util.ConvertObjectToDateTime(item.NgayNhapKho).ToShortDateString()</span>
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.TongThanhToan)
            </td>            
        </tr>
    }

</table>
<table>
    <tr>
        <td>
            Tổng tất cả thanh toán:        
            <input id="total" value="@ViewBag.TongNhapKho" readonly="true" style="border:none;width:auto"/>
        </td>
    </tr>
</table>

<script type="text/ecmascript">
    $(document).ready(function () {
        $("#total").formatCurrency();
    });
</script>